package Passager;

import Both.Ville;

public enum Profil {
	ENFANT("enfant"), ENFANTNA("enfantnonaccompagne"), JEUNE("jeune"), ETUDIANT("eudiant"), ADULTE("adulte"), SENIOR("senior"), COUPLE("couple"), FAMILLE("famille"), CF("cartefidelite"), UNKNOW("unknow");
	public String type;
	
	Profil(String type){
		this.type = type;
	}

    public static Profil toProfil(String profil) {
    	profil = profil.toUpperCase();
    	Profil retour = null;
        try {
            retour = Enum.valueOf(Profil.class, profil);
        } catch (Exception e) {
            retour = UNKNOW;
        }
        return retour;
    }

	/**
     * Print all valid commands to System.out.
     */
    public static void showAll() {
        Profil[] tableProfil = Profil.values();
        for (Profil profil : tableProfil) {
            System.out.println(profil);
        }
    }
}
